<?php
{% include 'header.tpl' %}
// No direct access
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.modal');

?>
<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == '{{ entity.name|lower }}.cancel' || document.formvalidator.isValid(document.id('{{ entity.name|lower }}-form'))) {
			Joomla.submitform(task, document.getElementById('{{ entity.name|lower }}-form'));
		}
	}
</script>
<form class="form-validate" action="<?php echo JRoute::_('index.php?option=com_{{ config.component.name|lower }}&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="{{ entity.name|lower }}-form">
	<fieldset class="adminform">
		<legend><?php echo JText::_( 'Formulario {{ entity.name }}' ); ?></legend>
		<ul class="adminformlist">
			{% for field in entity.fields %}
			<li>				
				<?php echo $this->form->getLabel('{{ field.name }}'); ?>
				<div class="clr"></div>
				<?php echo $this->form->getInput('{{ field.name }}'); ?>	
			</li>
			{% endfor%}
		</ul>

	</fieldset>
	<div>
		<input type="hidden" name="task" value="" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>

